package com.bookcloud.java21.chapter7.自定义异常76;

// 受检自定义异常
public class MyException extends Exception {
  public MyException() {}

  public MyException(String message) {
    super("【自定义受检异常】：" + message);
  }

  public MyException(int code, String message) {
    super("【自定义受检异常】" + code + "：" + message);
  }

  public MyException(int code, String message, Throwable cause) {
    super("【自定义受检异常】" + code + "：" + message, cause);
  }

  public MyException(
      int code,
      String message,
      Throwable cause,
      boolean enableSuppression,
      boolean writableStackTrace) {
    super("【自定义受检异常】：" + message, cause, enableSuppression, writableStackTrace);
  }
}
